require "common/Define"
require "framework/BaseController"
require "FairyGUI"

CutSceneMain = BaseController:New({mControllerName = "CutSceneMain"});

function CutSceneMain.Main()
	-- body
	CutSceneMain:Awake();
end

function CutSceneMain:Awake()
	Application.targetFrameRate = 60;
	Stage.inst.onKeyDown:Add(self.OnKeyDown, self);

	print(LevelManager.inst);
	LevelManager.inst:Init();
	LevelManager.inst:LoadLevel("scene1");
end

function CutSceneMain:OnKeyDown(context)
 	-- body
 	if (context.inputEvent.keyCode == KeyCode.Escape) then
		print "Exit Game!"
		Application.Quit();
	end
end